﻿<%@page import="cn.jdy.common.constant.GlobalConstant"%>
<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="jdy" uri="http://www.qwe.com.cn/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>康养旅居网</title>
    <%
	String path = request.getContextPath(); 
	request.setAttribute("path",path);
	request.setAttribute("VERSION", GlobalConstant.VERSION);// 版本号[试用]，每次发布时更新最后一位数;用于保存静态资源文件版本， 更新浏览器缓存
	%>
	<script type="text/javascript">
	var _path = '<%=path %>';
	var _user = '<%=session.getAttribute("user") %>';
	</script>
	          <jsp:include page="../common/common.jsp"/>
	
	<link rel="stylesheet" href="${path}/css/mui.min.css">
<link rel="stylesheet" href="${path}/iconfont/iconfont.css">
      <link rel="stylesheet" href="${path}/css/my20181016.css">
</head>
<body>
  <div class="title">
		<div class="top">
			<div class="pop">
                        <img src="${user.headImg}" alt="">
			</div>
			<div class="info">
				<span class="color">${member.mobile} </span> <br />
				<p>
				  <c:if test="${user.userLevel eq '0' }">运营商</c:if>
				 <c:if test="${user.userLevel eq '1'}">超级会员</c:if>
                 <c:if test="${user.userLevel eq '2'}">普通会员</c:if>
					 &nbsp; 粉丝数: <span class="color">${member.fans==null?0:member.fans}</span>
				</p>
			</div>
			<div class="setting">
                <i class="iconfont icon-account" onclick="opensez(${member.money})"></i>
			</div>
		</div>
		<div class="integral">
			<div class="profit">
				<span>昨日预期收益</span><br /> <b> 
	<fmt:formatNumber type="number" value="${zjjf==null?0.0:zjjf}" pattern="0.00"/> 
				 </b>
			</div>
			<div class="accumulation">
				<div class="left">
					<span>总收益</span><br /> <b>
						<fmt:formatNumber type="number" value="${member.score}" pattern="0.00"/> 
					</b>
				</div>
				<div class="right">
					<span>累计奖励</span><br /> <b>
											<fmt:formatNumber type="number" value="${lej==null?0.0:lej}" pattern="0.00"/> 
					</b>
				</div>
			</div>
		</div>
	</div>
	<div class="money">
		<span>佣金:<b>${member.money}元</b></span>
		<button onclick="opentix(${member.money})">提现</button>
	</div>
	<div class="money">
		<span>收益明细:<b> </b></span>
		<button onclick="openmingxi()">查看</button>
	</div>
	
		<div class="money">
		<span>推广链接 </span>
		<button onclick="openzd(${member.myyqm})">邀请</button>
	</div>
        
        <div class="dateil orderdateil"  id="mydan">
            <h4 style="font-size:16px;">我的订单</h4>
          
            
        
        </div>
        
    
    <jsp:include page="../common/footer.jsp"/>
     <script src="${path}/js/myorder.js"></script>
</body>
<script>
 
function opensez(){
	location.href="${path}/member/indexsz";
}
function openmingxi(){
	location.href="${path}/member/openmingxi";
}

function opentix(my){
	
 if(my>1){
	 layer.open({
		    content: '是否提现'
		    ,btn: ['确定', '取消']
		    ,skin: 'footer'
		    ,yes: function(index){

				 $.ajax({
			           url: _path + "/member/jianjifen?",
			           type: "get",
			           async: false,
			           dataType: 'json',
			           success: function (data) {
			        	   if(data.statusCode==200){
								layer.open({ content:"提现成功，2日内到账",skin: 'msg' ,time: 2 });//2秒后自动关闭
								$("#zj").text(0)
			        	   }else{
								layer.open({ content:data.info,skin: 'msg' ,time: 2 });//2秒后自动关闭

			        	   }
			           }
			     });
		    	
		    }
		  });
 }else{
		layer.open({ content:"金额不足无法提现",skin: 'msg' ,time: 2 });//2秒后自动关闭

 }
	  
}

function openzd(id){
	  //底部对话框
	  layer.open({
	    content: '页面打开后点击右上角分享给好友或者朋友圈'
	    ,btn: ['确定', '取消']
	    ,skin: 'footer'
	    ,yes: function(index){
	    //  layer.open({content: '执行删除操作'})
	      location.href="${path}/register/index?yqm="+id;
	    }
	  });
}
</script>
</html>

